package com.chaos.payment.controller;

import com.chaos.framework.model.dto.result.data.DataResult;
import com.chaos.framework.starter.base.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: crayon
 * @time: 2024/6/18 11:12
 */
@Slf4j
@RestController
@Api(tags = "统一下单控制器")
@RequestMapping("/order")
@RequiredArgsConstructor
public class UnifiedOrderController extends BaseController {


    private final UnifiedOrderWrapper unifiedOrderWrapper;

//    private final UnifiedOrderBsns unifiedOrderBsns;
//
//    @PostMapping("/generateOrderNo")
//    @ApiOperation(value = "生成订单号", httpMethod = "POST")
//    public DataResult<String> generateOrderNo(@RequestBody UnifiedXsnOrderDto data) {
//        return DataResult.ok(unifiedOrderBsns.generateOrderNo(data));
//    }
//
//    @PostMapping("/createOrder")
//    @ApiOperation(value = "统一下单", httpMethod = "POST")
//    public DataResult<UnifiedXsnOrderDto> createOrder(@RequestBody UnifiedXsnOrderDto data) {
//        return unifiedOrderWrapper.createOrder(data);
//    }
//
//    @PostMapping("/closeOrder")
//    @ApiOperation(value = "统一关单", httpMethod = "POST")
//    public DataResult<Boolean> closeOrder(@RequestBody UnifiedXsnOrderDto data) {
//        return DataResult.ok(unifiedOrderWrapper.closeOrder(data));
//    }
//
//    @PostMapping("/pay")
//    @ApiOperation(value = "支付", httpMethod = "POST")
//    public DataResult<PayResponse> pay(@RequestBody OrderPayDto data) {
//        return unifiedOrderWrapper.pay(data);
//    }
//
//    @PostMapping("/payQuery")
//    @ApiOperation(value = "主动查询", httpMethod = "POST")
//    public DataResult<PayResponse> payQuery(@RequestBody OrderPayDto data) {
//        return unifiedOrderWrapper.payQuery(data);
//    }
//
//
//    @PostMapping("/refund")
//    @ApiOperation(value = "退款", httpMethod = "POST")
//    public DataResult<RefundResponse> refund(@RequestBody OrderPayDto data) {
//        return unifiedOrderWrapper.refund(data);
//    }
//
//    @PostMapping("/refundQuery")
//    @ApiOperation(value = "退款查询", httpMethod = "POST")
//    public DataResult<RefundResponse> refundQuery(@RequestBody OrderPayDto data) {
//        return unifiedOrderWrapper.refundQuery(data);
//    }


}
